package keter.framework.model;

import keter.framework.model.base.BaseModel;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.jfinal.ext.plugin.tablebind.TableBind;


/**
 * <p>Class       : app.model.FileItem
 * <p>Descdription: 上传的磁盘文件和数据库记录映射
 *
 * @author  gulixing@msn.com
 * @version 1.0.0
 */
@TableBind(tableName="fileitem")
public class FileItem extends BaseModel<FileItem> {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = LoggerFactory.getLogger(FileItem.class);
    public static final FileItem dao = new FileItem();
    
    public FileItem findByFileId(String fileId){
    	return dao.findFirst(
            "select t.fileId, t.name, t.path from fileitem t where t.fileId=? limit 1", wrap(fileId)
        );
    }

    @Override
    protected void validate() {
    }
   
}
